import http from '@/utils/http'

/* 
 * 用户管理模块
 */

// 保存
export const save = (data) => {
        return http({
            url: '/user/insert',
            method: 'post',
            data
        })
    }
    // 删除
export const batchDelete = (param) => {
        return http({
            url: `/user/delete/${param}`,
            method: 'get',
        })
    }
    // 分页查询
export const findPage = (data) => {
        return http({
            url: '/user/all',
            method: 'get',
            data
        })
    }
    // 导出Excel用户信息
export const exportUserExcelFile = (data) => {
        return http({
            url: '/user/exportUserExcelFile',
            method: 'post',
            data
        })
    }
    // 查找用户的菜单权限标识集合
export const findPermissions = (params) => {
        return http({
            url: '/user/findPermissions',
            method: 'get',
            params
        })
    }
    // 根据用户名查找
export const findByName = (params) => {
        return http({
            url: '/user/findByName',
            method: 'get',
            params
        })
    }
    // 更新用户密码
export const updatePassword = (params) => {
    return http({
        url: '/user/updatePassword',
        method: 'get',
        params
    })
}